package study.javaee.practice.controller;
import org.springframework.web.bind.annotation.*;
import study.javaee.practice.common.BO.Result;
import study.javaee.practice.dao.UserDao;
import study.javaee.practice.entity.User;

import javax.annotation.Resource;

@RestController
@RequestMapping("/leader")
public class GetLeaderController {
    @Resource
    UserDao userDao;

    @GetMapping("/{leaderId}")
    public Result<?> getById(@PathVariable Long leaderId) {
        return Result.success(userDao.selectById(leaderId));
    }
}
